// 视频号配置管理
export const CHANNELS_CONFIG = [
  {
    finderUserName: '草源田径小将',
    nickname: '草源田径',
    description: '专注田径运动推广',
    category: '体育',
    priority: 1, // 优先级，数字越小优先级越高
    enabled: true // 是否启用
  },
  {
    finderUserName: '体育频道',
    nickname: '体育频道',
    description: '体育资讯和直播',
    category: '体育',
    priority: 2,
    enabled: true
  },
  {
    finderUserName: '运动健身',
    nickname: '运动健身',
    description: '专业运动健身指导',
    category: '健身',
    priority: 3,
    enabled: true
  }
]

// 获取启用的视频号配置
export const getEnabledChannels = () => {
  return CHANNELS_CONFIG.filter(channel => channel.enabled)
}

// 根据优先级排序
export const getSortedChannels = () => {
  return getEnabledChannels().sort((a, b) => a.priority - b.priority)
}

// 根据分类获取视频号
export const getChannelsByCategory = (category) => {
  return getEnabledChannels().filter(channel => channel.category === category)
}

// 获取所有分类
export const getAllCategories = () => {
  const categories = [...new Set(CHANNELS_CONFIG.map(channel => channel.category))]
  return categories
}

// 视频号状态枚举
export const LIVE_STATUS = {
  OFFLINE: 0,    // 未开播
  LIVE: 1,       // 直播中
  ENDED: 2       // 已结束
}

// 视频号状态文本映射
export const LIVE_STATUS_TEXT = {
  [LIVE_STATUS.OFFLINE]: '未开播',
  [LIVE_STATUS.LIVE]: '直播中',
  [LIVE_STATUS.ENDED]: '已结束'
}

// 视频号状态颜色映射
export const LIVE_STATUS_COLOR = {
  [LIVE_STATUS.OFFLINE]: '#999',
  [LIVE_STATUS.LIVE]: '#ff0000',
  [LIVE_STATUS.ENDED]: '#666'
} 